local t = Def.ActorFrame{};
if GAMESTATE:IsCourseMode() then
	t[#t+1] = Def.ActorFrame{
		LoadActor(THEME:GetPathG("_modes/mode on","Challenge")) .. {
			SetCommand=cmd(scaletoclipped,160,160;visible,group == "Challenge";);
		};		
	
		LoadActor(THEME:GetPathG("_modes/mode on","Nonstop")) .. {
			SetCommand=cmd(scaletoclipped,160,160;visible,group == "Nonstop";);
		};	
	};
end
t[#t+1] = Def.ActorFrame{
	Def.Banner{
		InitCommand=cmd(scaletoclipped,160,160);
			SetMessageCommand=function(self,params)
			group = params.Text;
			if group then
				self:LoadFromSongGroup(group);
			else
				-- fallback
				self:Load( THEME:GetPathG("Group jacket","fallback") );
			end;
		end;
	};	
	
	LoadActor(THEME:GetPathG("active group jacket", "genre")) .. {
		SetCommand=cmd(scaletoclipped,160,160;visible,GAMESTATE:GetSortOrder() == "SortOrder_Genre";);
	};		
	
	LoadActor(THEME:GetPathG("active group jacket", "ABC")) .. {
		SetCommand=cmd(scaletoclipped,160,160;visible,GAMESTATE:GetSortOrder() == "SortOrder_Title";);
	};	
	
	LoadActor(THEME:GetPathG("active group jacket", "BPM")) .. {
		SetCommand=cmd(scaletoclipped,160,160;visible,GAMESTATE:GetSortOrder() == "SortOrder_BPM";);
	};

	LoadActor(THEME:GetPathG("group jacket", "ABC")) .. {
		SetCommand=cmd(scaletoclipped,160,160;visible,GAMESTATE:GetSortOrder() == "SortOrder_Artist";);
	};
	
	LoadActor(THEME:GetPathG("Folder", "active")) .. {
		InitCommand=cmd(zoom,0.55;);
	};
	
	LoadFont("Common normal")..{
		InitCommand=cmd(y,0;maxwidth,100);
		SetMessageCommand=function(self, params)
		local song = params.Song;
		group = params.Text;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_Title" then
				self:settext(group);
				self:diffuse(color("#FFFFFF"));
					if group == "Other" then
						self:settext("&?!");
					end;
			else
			self:settext("");
			end;
		end;
	};
	
	LoadFont("Common normal")..{
		InitCommand=cmd(y,0;maxwidth,160;rotationz,45;uppercase,true;);
		SetMessageCommand=function(self, params)
		local song = params.Song;
		group = params.Text;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_Genre" then
				self:settext(group);
				self:diffuse(color("#FFFFFF"));
			else
			self:settext("");
			end;
		end;
	};
	
	LoadFont("Common normal")..{
		InitCommand=cmd(y,0;maxwidth,160;rotationz,45;uppercase,true;);
		SetMessageCommand=function(self, params)
		local song = params.Song;
		group = params.Text;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_BPM" then
				self:settext(group);
				self:diffuse(color("#FFFFFF"));
			else
			self:settext("");
			end;
		end;
	};	
	
	LoadFont("Common normal")..{
		InitCommand=cmd(y,0;maxwidth,100);
		SetMessageCommand=function(self, params)
		local song = params.Song;
		group = params.Text;
		local so = GAMESTATE:GetSortOrder();
			if so == "SortOrder_Artist" then
				self:settext(group);
				self:diffuse(color("#FFFFFF"));
					if group == "Other" then
						self:settext("&?!");
					end;
			else
			self:settext("");
			end;
		end;
	};	
	
}

return t;